package lc_198_打家劫舍;

public class Solution {
	public int rob(int[] nums) {
		int a = 0, b = 0;
		for (int num : nums) {
			int x = b;
			b = Math.max(num + a, b);
			a = x;
		}
		return b;
	}
}